package solutions;

import org.pi4.locutil.GeoPosition;

public class PositionUtils {

	public static double getDistance(double d1, double d2) {

		return Math.sqrt((d1 - d2) * (d1 - d2));
	}

	public static double getDistance(GeoPosition pos1, GeoPosition pos2) {

		double distance = 0;
		distance += Math.pow(pos1.getX() - pos2.getX(), 2);
		distance += Math.pow(pos1.getY() - pos2.getY(), 2);

		return Math.sqrt(distance);
	}
}
